export{}

// 泛型
function join1<Anzia>(first: Anzia, second: Anzia) {
    return `${first}${second}`
}

function join2<T, P>(first: T, second: P) {
    return `${first}${second}`
}

join1<number>(1, 1)

join2<string, number>('a', 1)

// 泛型中数组的使用
function myFun<T>(params: Array<T>) {
    return params;
}

myFun<string>(['a', 'b'])